﻿using System.Threading;

namespace GeneratorModels.Utility
{
    internal class UtilityMethod
    {
        /// <summary>
        ///     首字母大写
        /// </summary>
        internal static string ToTitleCase(string source)
        {
            if (source.Contains("_"))
                return Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(source).Replace("_", "");
            return source.Substring(0, 1).ToUpper() + source.Substring(1);
        }
    }
}